const express = require('express')
const router = express.Router()
const votesApi = require('../controller/votes')

router.get('/votes', votesApi.fetchVotesInTeam)

router.post('/votes', votesApi.createVote)

router.get('/votes/:voteId', votesApi.fetchVote)

router.get('/votes/:voteId/buckets', votesApi.fetchBucket)

router.post('/votes/:voteId/buckets', votesApi.createBucket)

router.get('/votes/:voteId/results', votesApi.fetchVoteResult)

router.get('/votes/:voteId/allbuckets', votesApi.fetchAllVoteBucket)

module.exports = router
